﻿<UserControl xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"  x:Class="EasySL.UI.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:sCtrl="clr-namespace:EasySL.Controls;assembly=EasySL.Controls"
    xmlns:localControl="clr-namespace:EasySL.UI.Controls"
    >
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid Background="#dfe8f6">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Grid Grid.ColumnSpan="2" Height="36">              
                <Image Source="Images/top_bg.png" Stretch="Fill"></Image>
                <Image Source="Images/logo.png" Stretch="None" Opacity="0.7" HorizontalAlignment="Left" Margin="20,0,0,0"></Image>
            </Grid>
            <Grid Grid.ColumnSpan="2" Grid.Row="1" Height="26">
                <Image Source="Images/topmenu_bg.png" Stretch="Fill"></Image>
                <TextBlock x:Name="userInfo" Opacity="0.5"  Margin="10,5,5,5"></TextBlock>
            </Grid>
            <Grid Grid.Row="2" Grid.Column="0" Margin="5">
                <Border x:Name="leftPanel" Width="170" BorderBrush="#99bbe8" BorderThickness="1">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid Height="26" Grid.Row="0">
                            <Image Source="Images/leftTitle_bg.png" Stretch="Fill"></Image>
                            <TextBlock Margin="6">Menu Panel</TextBlock>                           
                            <Image x:Name="expand" Source="Images/leftShow_icon.png" Stretch="None" Margin="3" HorizontalAlignment="Right" Opacity="0"></Image>
                            <Image x:Name="collapse" Source="Images/leftHide_icon.png" Stretch="None" Margin="3" HorizontalAlignment="Right" Opacity="1" Cursor="Hand"></Image>
                        </Grid>
                        <Border Height="1" Grid.Row="1" Background="#99bbe8" />
                        <Grid Grid.Row="2" Background="White" x:Name="leftMenuPanel">
                            <localControl:Menu x:Name="menu"></localControl:Menu>
                        </Grid>
                    </Grid>                
                </Border>
            </Grid>
            <Grid Grid.Row="2" Grid.Column="1" Margin="5">
                <Border x:Name="rightPanel" BorderBrush="#99bbe8" BorderThickness="1">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid Height="28">
                            <Image Source="Images/rightTitle_bg.png" Stretch="Fill"></Image>
                            <Border CornerRadius="3" Height="24" BorderBrush="#8db2e3" Margin="8,0,0,0" BorderThickness="1,1,1,0" HorizontalAlignment="Left">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                        <GradientStop Color="#ffffff" Offset="0"/>
                                        <GradientStop Color="#deecfd" Offset="1"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                                <TextBlock Margin="3" VerticalAlignment="Top" x:Name="rightTitle">Operation Panel</TextBlock>
                            </Border>                            
                        </Grid>
                        <ScrollViewer Grid.Row="1"  VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" BorderThickness="0">
                            <Grid  x:Name="rightContent" />
                        </ScrollViewer>
                    </Grid>
                </Border>
            </Grid>
        </Grid>
        <localControl:Login x:Name="login"/>
    </Grid>
    <UserControl.Resources>
        <Storyboard x:Name="hideMenu">
            <DoubleAnimation Storyboard.TargetName="leftPanel" Storyboard.TargetProperty="Width" To="26" Duration="0:0:0.3"></DoubleAnimation>
            <DoubleAnimation Storyboard.TargetName="collapse" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.1"></DoubleAnimation>
            <DoubleAnimation Storyboard.TargetName="expand" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.5"></DoubleAnimation>
            <DoubleAnimation Storyboard.TargetName="leftMenuPanel" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.2"></DoubleAnimation>
        </Storyboard>
        <Storyboard x:Name="showMenu">
            <DoubleAnimation Storyboard.TargetName="leftPanel" Storyboard.TargetProperty="Width" To="170" Duration="0:0:0.3"></DoubleAnimation>
            <DoubleAnimation Storyboard.TargetName="collapse" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.5"></DoubleAnimation>
            <DoubleAnimation Storyboard.TargetName="expand" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.1"></DoubleAnimation>
            <DoubleAnimation Storyboard.TargetName="leftMenuPanel" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2"></DoubleAnimation>
        </Storyboard>
    </UserControl.Resources>
</UserControl>
